<?php

class CreateHiveTable extends HiveCliActivity {
		
	public function __construct($activity) {
		parent::__construct($activity);
	}
	
	protected function preparePrograms() {
		$programs = CJSON::decode($this->activity['programs']);
		
		$input = $this->inputs[0];
		$output = $this->outputs[0];
    	$programs[0] = $this->concreteProgram($programs[0], array(
    		'${tableName}'			=>	$output['resource']['res_name'],
    		'${columnDefinition}'	=>	$this->generateColumns($input['filter']['select']),
    	));
    	return $programs;
	}
}
